{% extends 'base.html' %}
{% block top %}
    <title>首页</title>
    {{ super() }}
{% endblock %}
{% block content %}
     <input type="hidden" name="point" value="{{ titles_id }}">
<nav class="navbar navbar-inverse" >
  <div class="container" style="margin-top:30px">
    <!-- Brand and toggle get grouped for better mobile display -->
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand" href="#" style="color: white">北京智诚众和科技有限公司</a>
    </div>
    <!-- Collect the nav links, forms, and other content for toggling -->
    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
      <ul class="nav navbar-nav">

            {% for datas in info %}
            <li><a href="/v1.0/more/{{ datas.num }}">{{ datas.name }}</a></li>
            {% endfor %}
            {% for code in code_1 %}
                <li><a href="/v1.0/table/{{ code.id }}">{{ code.name }}</a></li>
            {% endfor %}
        <li>
        <form class="navbar-form navbar-left" action="search"  method="post">
            <input type="hidden" name="csrf_token" value="{{ token }}">
        <div class="form-group">
          <input type="text" class="form-control" placeholder="站内搜索" name="search">
        </div>
        <button type="submit" class="btn btn-default">搜索</button>
      </form>
      </li>

      </ul>
    </div><!-- /.navbar-collapse -->
  </div><!-- /.container-fluid -->
 <div style="color: white;float: right">
          {% for msg in get_flashed_messages() %}
              {{ msg }}
          {% endfor %}
 </div>
</nav>








	<div class="container" style="">
		<div class="main" style="margin-top:20px">
		   <div class="row" style="margin: auto;">
           {% for datas in info %}
		   		<div class="list_item col-sm-push-3 " style="background-color:#fff">
		   			<p class="item_title">{{datas.name}}</p>
		   			<ul class="item_detail">
                        {% for data in datas.data %}
		   				<li class="row">
		   					<div class="col-sm-9"><a href="

		   					/v1.0/detail/{% if data.content_id %}{{data.content_id}}{% else %}{{ data.md5 }}{% endif %}" class="red-point" id="{{ data.id }}">{{ data.title}}</a></div>
                            <span class="col-sm-3">{{ data.update_time }}</span>
		   				</li>
                       {% endfor %}
		   			</ul>
		   			<div class="show_more row">
		   				<a href="/v1.0/more/{{ datas.num }}">查看更多</a>
		   			</div>
		   		</div>
             {% endfor %}

                {% for data in table_data %}
		   		<div class="list_item col-sm-push-3 " style="background-color:#fff">

		   			<p class="item_title">{{data.name}}</p>
		   			<ul class="item_detail">
                        {% for content in data.data %}
		   				<li class="row">
		   					<div class="col-sm-9"><a href="{{ content.url }}">{{ content.data_title}}</a></div>
		   					<span class="col-sm-3">{{ now_time }}</span>
		   				</li>
                       {% endfor %}
		   			</ul>
		   		</div>
             {% endfor %}
		   </div>
		</div>
	</div>
<script>
    var data=$("input[name='point']").val().split(",")
{#    alert(data)#}
    $(".red-point").each(function () {
        var a=$(this).attr("id")
        if ($.inArray(a,data)!=-1){
          $(this).removeAttr("class")
        }
    })
</script>
{% endblock %}

